Pair

interface Pair

A key-value pair that represents a segment of a multi-part form data. Can contain values corresponding a form field content, an upload file content, etc.

Functions

Link copied to clipboard
open fun fileValue(): Optional<File>
Returns the form content segment value as a file.
Link copied to clipboard
open fun key(): String
Returns a string that represents the form content segment key.
Link copied to clipboard
open fun of(key: String, value: File): MultipartFormData.Pair
open fun of(key: String, value: String): MultipartFormData.Pair
Returns the Pair instance for the given key and value.
Link copied to clipboard
Returns the form content segment value as a string.